package main;
import java.math.BigDecimal;


public class Passage implements Comparable {

	private String topicID;

	private String passageID;

	private String documentID;

	private BigDecimal weight;

	private Integer start;

	private Integer offset;

	private String passageContent;

	private BigDecimal similarityRank;

	private String[] foundTerms;

	private String terms;

	private String outString;
	
	private String termsCount;

	private String totalTermsCount;

	public String getDocumentID() {
		return documentID;
	}

	public void setDocumentID(String documentID) {
		this.documentID = documentID;
	}

	/**
	 * @return the foundTerms
	 */
	public String[] getFoundTerms() {
		return foundTerms;
	}

	/**
	 * @param foundTerms the foundTerms to set
	 */
	public void setFoundTerms(String[] foundTerms) {
		this.foundTerms = foundTerms;
	}

	/**
	 * @return the passageContent
	 */
	public String getPassageContent() {
		return passageContent;
	}

	/**
	 * @param passageContent the passageContent to set
	 */
	public void setPassageContent(String passageContent) {
		this.passageContent = passageContent;
	}

	/**
	 * @return the passageID
	 */
	public String getPassageID() {
		return passageID;
	}

	/**
	 * @param passageID the passageID to set
	 */
	public void setPassageID(String passageID) {
		this.passageID = passageID;
	}

	/**
	 * @return the similarityRank
	 */
	public BigDecimal getSimilarityRank() {
		return similarityRank;
	}

	/**
	 * @param similarityRank the similarityRank to set
	 */
	public void setSimilarityRank(BigDecimal similarityRank) {
		this.similarityRank = similarityRank;
	}

	/**
	 * @return the topicID
	 */
	public String getTopicID() {
		return topicID;
	}

	/**
	 * @param topicID the topicID to set
	 */
	public void setTopicID(String topicID) {
		this.topicID = topicID;
	}

	/**
	 * @return the terms
	 */
	public String getTerms() {
		return terms;
	}

	/**
	 * @param terms the terms to set
	 */
	public void setTerms(String terms) {
		this.terms = terms;
	}

	/**
	 * @return the outString
	 */
	public String getOutString() {
		return outString;
	}

	/**
	 * @param outString the outString to set
	 */
	public void setOutString(String outString) {
		this.outString = outString;
	}

	public int compareTo(Object o) {
		Passage psg = (Passage) o;
		return -(getSimilarityRank().compareTo(psg.getSimilarityRank()));
	}

	public String toString(){
		StringBuffer sb = new StringBuffer();
		sb.append("topicID="+topicID).append(",passageID="+passageID).append(",similarityRank="+similarityRank).append(",terms="+terms).append(",outString="+outString);
		return sb.toString();
	}

	public String toString(int index) {
		StringBuffer sb = new StringBuffer();
		sb.append(topicID).append(" " + documentID).append(" " + index)
				.append(" " + weight).append(" " + start).append(" " + offset)
				.append(" " + terms);
		return sb.toString();
	}

	public Integer getOffset() {
		return offset;
	}

	public void setOffset(Integer offset) {
		this.offset = offset;
	}

	public Integer getStart() {
		return start;
	}

	public void setStart(Integer start) {
		this.start = start;
	}

	public BigDecimal getWeight() {
		return weight;
	}

	public void setWeight(BigDecimal weight) {
		this.weight = weight;
	}

	public String getTermsCount() {
		return termsCount;
	}

	public void setTermsCount(String termsCount) {
		this.termsCount = termsCount;
	}

	public String getTotalTermsCount() {
		return totalTermsCount;
	}

	public void setTotalTermsCount(String totalTermsCount) {
		this.totalTermsCount = totalTermsCount;
	}



}
